package com.oo.inherit_3.school;

/**
 * Teacher--${description}
 *
 * @author: Jovi
 * @createTime: 2017-05-09 13:38
 **/
public class Teacher extends Person {

    private String item;

    private int stuAge;

    public Teacher(String name, int age, String sex, String item, int stuAge) {
        super(name, age, sex);
        this.item = item;
        this.stuAge = stuAge;
    }

    public Teacher() {
    }

    public String getItem() {
        return item;
    }

    public void setItem(String item) {
        this.item = item;
    }

    public int getStuAge() {
        return stuAge;
    }

    public void setStuAge(int stuAge) {
        this.stuAge = stuAge;
    }

    protected void teach() {
        System.out.println("教授"+this.getItem()+"，他具有"+this.getStuAge()+"教龄");
    }

    @Override
    protected void intro() {
        System.out.println(this.getName() + "老师，今年" + this.getAge() + "岁");
    }

    @Override
    protected void sleep() {
        System.out.println("作为一个好老师，一定要先备课，再睡觉");
    }
}
